package com.microcity.cleanjava.app;

import android.app.Activity;
import android.content.Context;
import android.support.multidex.MultiDex;

import com.darksider.basemodule.global.GlobalApp;
import com.microcity.cleanjava.di.AppInjector;

import javax.inject.Inject;

import dagger.android.DispatchingAndroidInjector;
import dagger.android.HasActivityInjector;

/**
 * User: yaodong(1126220529@qq.com)
 * Date: 2017-11-24
 * Time: 15:54
 * Description:
 * Update:
 */

public class App extends GlobalApp implements HasActivityInjector{

    @Inject
    DispatchingAndroidInjector<Activity> dispatchingAndroidInjector;

    @Override
    public void onCreate() {
        super.onCreate();
        AppInjector.init(this);
    }


    @Override
    public DispatchingAndroidInjector<Activity> activityInjector() {
        return dispatchingAndroidInjector;
    }


    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}
